package com.weblog.home.client;

import com.weblog.home.client.impl.CategoryClientImpl;
import com.weblog.home.interceptor.FeignInterceptor;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


/**
 * @author MaoLin Wang
 * @date 2019/9/2215:37
 */
@FeignClient(value = "weblog-article",fallback = CategoryClientImpl.class,configuration = FeignInterceptor.class)
public interface CategoryClient {
    /**
     * 根据clevel查询分类id和分类名 (客户端使用)
     * @param clevel
     * @return
     */
    @GetMapping(value = "category/client/home/{clevel}")
    Result findCidsAndCnamesByClevel(@PathVariable("clevel") int clevel) ;

    /**
     * 查询总记录数
     * @return
     */
    @GetMapping("category/client/count")
    Result countTotal();
}
